package cn.bdqn.service.impl;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import cn.bdqn.dao.AppInfoDao;
import cn.bdqn.dto.AppInfoDTO;
import cn.bdqn.entity.AppInfo;
import cn.bdqn.service.AppInfoService;
@Service
public class AppInfoServiceImpl implements AppInfoService {
	@Autowired
	AppInfoDao appdao ;
	@Override
	public List<AppInfoDTO> fiandDownLoadsTop7() {	
		  List<AppInfo> app= appdao.fiandDownLoadsTop7();
		  
		  List<AppInfoDTO> list=new ArrayList<>();
		  for (AppInfo appInfo : app) {
		    AppInfoDTO dto=new AppInfoDTO();
		    BeanUtils.copyProperties(appInfo, dto);
		    list .add(dto);
		}
		return list;
	}
	
}
